package com.boot.common.exception;


import com.boot.common.po.Result;

public class UnAuthorizedException extends RuntimeException {
    private Integer code;

    public UnAuthorizedException(Result result) {
        super(result.getMessage());
        this.code = result.getCode();
    }

    public UnAuthorizedException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
